package org.ch04.test00.lx01;

/**
 * @author ZQX
 * @date 2025-03-31
 */
public class Student {
    private String name ;

    @MinAge(20)
    private int age ;

    public Student() {
    }

    @MinAge(20)
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    @MinAge(20)
    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
